﻿#ifndef FORMREALTIMEDATA_H
#define FORMREALTIMEDATA_H

#include <QWidget>

#include "config/jsonconfig.h"

namespace Ui {
class FormRealtimeData;
}

class FormRealtimeData : public QWidget
{
    Q_OBJECT

public:
    explicit FormRealtimeData(JsonConfig* jsonConfig, QWidget *parent = nullptr);
    ~FormRealtimeData();

    // 控制显示操作的复选框状态
    void changeShowOperation(bool enabled);
    // 把值置0
    void clear();

private:
    void initUI();
    void init();

private:
    Ui::FormRealtimeData *ui;


private:
    // JSON配置文件
    JsonConfig* m_jsonConfig;

    // 选择固定通道
    bool m_inFixedChannel;
    QList<FixedChannel> m_fixedChannelList;

signals:
    void sigUpdatePlot(const QStringList idList);
    void sigTestingVisible(bool visible);

private slots:
    void onFixedChannel();
    void onDiskCapacity();
    void onPlotChanged(int);
    void onTestingChanged(int);

public slots:
    void onRefreshData();
};

#endif // FORMREALTIMEDATA_H
